package sonet;

/**Class Connection*/
public class Connection implements Entity{
	private Agent _from;
	private Agent _to;
	private ConnectionStatus _fromStatus;
	private ConnectionStatus _toStatus;
	
/**Connection's Constructor*/
	public Connection(Agent from,Agent to,ConnectionStatus fromStatus, ConnectionStatus toStatus ){
		_from= from;
		_to=to;
		_toStatus = toStatus;
		_fromStatus = fromStatus;
	}

/**Gets of the Connection's attributes*/	
	public Agent getFrom(){return _from;}
	public ConnectionStatus getFromStatus(){return _fromStatus;}
	public Agent getTo(){return _to;}
	public ConnectionStatus getToStatus(){return _toStatus;}
	public ConnectionStatus getStatus(Agent a){
		if( a == _from){return _fromStatus;}
		else{return _toStatus;}	
	}
}

